<template>
  <div class="wrap">
    <header class="header">
      <span class="back" v-if="$route.meta.back" @click="$router.go(-1)"
        ><i class="icon-fanhui iconfont"></i></span
      >
      <div class="text">{{$route.meta.title}}</div>
      <router-link to="/register" class="register"
        v-if="$route.meta.register">注册</router-link
      >
    </header>
    <router-view></router-view>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
.wrap{
  padding-top: 0.6rem;
}
.second-view{
  background: orange;
}
.con{
  padding-top: 0.6rem;
}
.header{
  width: 100vw;
  height: 0.6rem;
  background: #ff4400;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
 
}
.back{
  position: absolute;
  left: 0.2rem;
  line-height: 0.6rem;
   color: #fff;
}
.back i{
  color: #fff;
}
.text{
  width: 100%;
  line-height: 0.6rem;
  text-align: center;
   color: #fff;
}
.register{
   position: absolute;
  right: 0.2rem;
  line-height: 0.6rem;
   color: #fff;
  top: 0;
}
</style>